{include file="public/header" /}
<link rel="stylesheet" href="/static/common/css/templte.css" media="all">
<style>
    html {
        background-color: #f2f2f2 !important;
    }

    .icon_img {
        width: 40px;
    }
    .layadmin-homepage-content{
        margin-left: -2px !important;
    }
    .layui-fluid{
        padding: 15px !important;
    }
    .layadmin-homepage-shadow{
        box-shadow:none !important;
        border-radius: 50px 50px 0 0 !important;
    }
    .census li{
        text-align: center;
    }
    h3{
        font-weight: bold;
        font-size: 13px !important;
    }
    .census-cite{
        position: relative;
        top: 2px;
        display: block;
        color: #666;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        font-size: 14px
    }
</style>
<body>
<div class="layui-fluid layadmin-homepage-fluid layui-anim layui-anim-downbit">
    <div class="layui-row layui-col-space8">
        <div class="layui-col-md2">
            <div class="layadmin-homepage-panel layadmin-homepage-shadow" style="padding-bottom: 10px">
                <div class="layui-card text-center">
                    <div class="layui-card-body">
                        <div class="layadmin-homepage-pad-ver">
                            <img class="layadmin-homepage-pad-img" src="{$_business.logo}" width="96" height="96">
                        </div>
                        <p style="padding-bottom: 5px">{if $_business.type == 1}<span class="layui-badge">线上店铺</span>{else}<span
                                class="layui-badge  layui-bg-cyan">线下店铺</span>{/if}</p>
                        <h4 class="layadmin-homepage-font">{$_business.title}</h4>
                        <p class="layadmin-homepage-min-font">{$_business.contacts} - {$_business.mobile}</p>
                        <div style="display: flex">
                            <button class="layui-btn layui-btn-fluid editBusiness">修改资料</button>
                        </div>
                    </div>
                </div>
                <p class="layadmin-homepage-about">
                    客服电话
                </p>
                <ul class="layadmin-homepage-list-group">
                    <li class="list-group-item"><i class="layui-icon layui-icon-service"></i>
                        <a style="text-decoration: underline" href="tel:{$_business.customer_tel}">{$_business.customer_tel}</a>
                    </li>
                </ul>
                <p class="layadmin-homepage-about">
                    店铺地址
                </p>
                <ul class="layadmin-homepage-list-group">
                    <li class="list-group-item"><i class="layui-icon layui-icon-location"></i>{$_business.full_address}
                    </li>
                </ul>
                <p class="layadmin-homepage-about">
                    退货地址
                </p>
                <ul class="layadmin-homepage-list-group">
                    <li class="list-group-item"><i class="layui-icon layui-icon-location"></i>{$_business.return_full_address}
                    </li>
                </ul>
                <p class="layadmin-homepage-about">
                    经营类目
                </p>
                <div class="layui-btn-container" style="padding-left: 15px">
                    {foreach name="$_business.Cate1Text" item="vo"}
                    <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-danger">{$vo}</a>
                    {/foreach}
                </div>
            </div>
            <div class="layui-card homepage-bottom"  style="padding-bottom: 10px">
                <div class="layui-card-header">
                    <h3 class="panel-title">
                        <i class="layui-icon layui-icon-form"></i>
                        银行信息
                    </h3>
                </div>
                <div class="layui-card-body">
                    <p class="layadmin-homepage-about">
                        银行名称
                    </p>
                    <ul class="layadmin-homepage-list-group">
                        <li class="list-group-item">
                           {$_business.bank_name}
                        </li>
                    </ul>
                    <p class="layadmin-homepage-about">
                        开户行
                    </p>
                    <ul class="layadmin-homepage-list-group">
                        <li class="list-group-item">
                            {$_business.bank_open}
                        </li>
                    </ul>
                    <p class="layadmin-homepage-about">
                        银行户名
                    </p>
                    <ul class="layadmin-homepage-list-group">
                        <li class="list-group-item">
                           {$_business.bank_account}
                        </li>
                    </ul>
                    <p class="layadmin-homepage-about">
                        银行卡号
                    </p>
                    <ul class="layadmin-homepage-list-group">
                        <li class="list-group-item">
                          {$_business.bank_number}
                        </li>
                    </ul>

                </div>
            </div>
        </div>
        <div class="layui-col-md10">
            <div class="layui-fluid layadmin-homepage-content">
                <div class="layui-row  layadmin-homepage-padding15">
                    <hr class="new-section-xs">
                    <div class="layui-col-md9 layadmin-homepage-padding8">
                        <div class="layui-row layadmin-homepage-text-center">
                            <div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
                                <p class="h4">{$result.otherCensus.today_visitor}</p>
                                <mdall>今日访客</mdall>
                            </div>
                            <div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
                                <a href="javascript:;" class="follow">
                                    <p class="h4">{$_business.fans}</p>
                                    <mdall>店铺关注人数</mdall>
                                </a>
                            </div>
                            <div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
                                <a href="javascript:;" class="collect">
                                    <p class="h4">{$_business.collect}</p>
                                    <mdall>店铺收藏人数</mdall>
                                </a>
                            </div>
                            <div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
                                <p class="h4"><i class="layui-icon layui-icon-rate-solid"></i>{$_business.describe_score}
                                </p>
                                <mdall>描述评分</mdall>
                            </div>
                            <div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
                                <p class="h4"><i class="layui-icon layui-icon-rate-solid"></i>{$_business.logistics_score}
                                </p>
                                <mdall>物流评分</mdall>
                            </div>
                            <div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
                                <p class="h4"><i class="layui-icon layui-icon-rate-solid"></i>{$_business.service_score}
                                </p>
                                <mdall>服务评分</mdall>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-row layui-col-space20 layadmin-homepage-list-imgtxt">
                    <div class="layui-col-md9" style="padding: 0">
                        <div class="layui-card">
                            <div class="layui-card-header">销售额统计</div>
                            <div class="layui-card-body">
                                <ul class="layui-row layui-col-space12 layui-this census"
                                    style="margin-left: 0;">
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>总销售额(元)</h3>
                                            <p><cite>{$result.incomeCensus.sum}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>今日销售额(元)</h3>
                                            <p><cite>{$result.incomeCensus.today}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>本周销售额(元)</h3>
                                            <p><cite>{$result.incomeCensus.week}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>本月销售额(元)</h3>
                                            <p><cite>{$result.incomeCensus.month}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>已入账(元)</h3>
                                            <p><cite>{$_business.recorded}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs2">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>待入账(元)</h3>
                                            <p><cite>{$_business.not_recorded}</cite></p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="layui-card">
                            <div class="layui-card-header">订单数统计</div>
                            <div class="layui-card-body">
                                <ul class="layui-row layui-col-space12 layui-this census"
                                    style="margin-left: 0;">
                                    <li class="layui-col-xs3">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>总订单数</h3>
                                            <p><cite>{$result.orderCensus.sum}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>今日订单数</h3>
                                            <p><cite>{$result.orderCensus.today}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>本周订单数</h3>
                                            <p><cite>{$result.orderCensus.week}</cite></p>
                                        </a>
                                    </li>
                                    <li class="layui-col-xs3">
                                        <a href="javascript:;" class="layadmin-backlog-body">
                                            <h3>本月订单数</h3>
                                            <p><cite>{$result.orderCensus.month}</cite></p>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                        <div class="layui-card">
                            <div class="layui-card-header"
                                 style="display: flex;align-items: center;justify-content: space-between">
                                <div>销售额统计(折线图)</div>
                                <div>
                                    <input id="diagram-date" class="layui-input" placeholder="点击选择日期" value="{:date('Y-m')}" autocomplete="off"/>
                                </div>
                            </div>
                            <div class="layui-card-body" id="chart" style="height: 370px; ">
                                <div class="layui-carousel layadmin-carousel layadmin-backlog">

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md3" style="padding-top: 0">
                        <div class="grid-demo">
                            <div class="layui-card">
                                <div class="layui-card-header">快捷操作</div>
                                <div class="layui-card-body">
                                    <ul class="layui-row layui-col-space12 layui-this census"
                                        style="margin-left: 0;">
                                        <li class="layui-col-xs3">
                                            <a lay-href="{:url('product/index')}">
                                                <img src="/static/admin/images/draw.png" class="icon_img"
                                                     style="width: 40px"/>
                                                <cite class="census-cite">商品列表</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="{:url('order/index')}">
                                                <img src="/static/admin/images/chongzhi.png"
                                                     class="icon_img" style="width: 40px"/>
                                                <cite class="census-cite">订单列表</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="{:url('productEvaluate/index')}">
                                                <img src="/static/admin/images/draw.png" class="icon_img"
                                                     style="width: 40px"/>
                                                <cite class="census-cite">评价列表</cite>
                                            </a>
                                        </li>
                                        <li class="layui-col-xs3">
                                            <a lay-href="{:url('orderRefund/index')}">
                                                <img src="/static/admin/images/zhuanzhang.png"
                                                     class="icon_img" style="width: 40px"/>
                                                <cite class="census-cite">退款退货</cite>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="layui-card homepage-bottom">
                                <div class="layui-card-header">
                                    <h3 class="panel-title">
                                        <i class="layui-icon layui-icon-form"></i>
                                        最新订单
                                    </h3>
                                </div>
                                <div class="layui-card-body">
                                    {foreach name="list" item="vo"}
                                    <a href="javascript:;" class="layadmin-privateletterlist-item">
                                        <div class="meida-left">
                                            <img src="{$vo.icon}">
                                        </div>
                                        <div class="meida-right">
                                            <p>{$vo.sn}</p>
                                            <mdall>{$vo.product}</mdall>
                                        </div>
                                    </a>
                                    {/foreach}
                                    <p style="text-align: center;padding: 10px"><a lay-href="{:url('order/index')}">订单列表</a></p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>
</body>
{include file="public/footer" /}
<script type="text/javascript" src="/static/admin/js/echarts.min.js"></script>
<script type="text/javascript" src="/static/admin/js/echartsTheme.js"></script>
<script>
    var chartDom = document.getElementById('chart');
    var myChart = echarts.init(chartDom, 'macarons');

    var option;
    getDiagramCensus();

    layui.use(['laydate'], function () {
        var laydate = layui.laydate;
        laydate.render({
            elem: '#diagram-date',
            type: 'month',
            min: '1970-01-01',
            max: '{:date("Y-m-d")}',
            change: function(value, date, endDate){
                getDiagramCensus(value)
            }
        })
    })

    //修改资料
    $(".editBusiness").click(function (){
        zhiju_show('修改资料', '{:url("business/edit")}', 1920, 1080, 0)
    });

    function getDiagramCensus(date) {
        $.get('{:url("index/getDiagramCensus")}', {date: date}, function (data) {
            option = {
                xAxis: {
                    type: 'category',
                    boundaryGap: false,
                    data: data.data.diagramDate
                },
                yAxis: {
                    type: 'value'
                },
                grid: {
                    left: '2%', //默认10%
                    right: '2%', //默认10%
                    top: '8%', //默认10%
                    bottom: '8%', //默认60
                    containLabel: true
                },
                tooltip: {
                    trigger: 'axis', //坐标轴触发，主要在柱状图，折线图等会使用类目轴的图表中使用
                    axisPointer: {
                        type: 'shadow'
                    }
                },
                series: [
                    {
                        data: data.data.diagramValue,
                        type: 'line',
                        areaStyle: {}
                    }
                ]
            };
            option && myChart.setOption(option);
        });
    }
</script>
</html>